﻿using System;
using System.Text;
using System.Collections.Generic;

namespace LibMSNP.HTTP
{
    public enum RequestTypes
    {
        POST,
        GET,
        HEAD,
        OPTIONS,
        PUT,
        DELETE,
        TRACE,
        CONNECT
    }

    public abstract class HTTPHeader
    {
        protected string _firstEntry;
        protected string _secondEntry;
        protected readonly string VERSION = "HTTP/1.1";
        protected MimeHeaders _headers;
        protected readonly string LINE_END = "\r\n";

        protected HTTPHeader(string firstEntry, string secondEntry)
        {
            _headers = new MimeHeaders();
            
            _headers["Cache-Control"] = string.Empty;
            _headers["Connection"] = string.Empty;
            _headers["Date"] = string.Empty;
            _headers["Content-Length"] = string.Empty;
            _headers["Content-Type"] = string.Empty;
            _headers["Server"] = string.Empty;

            _firstEntry = firstEntry;
            _secondEntry = secondEntry;
        }

        public abstract string this[string index]
        {
            get;
            set;
        }

        public abstract MimeHeaders Headers
        {
            get;
        }

        public abstract override string ToString();
        public abstract byte[] ToBytes();
        
        public abstract string CacheControl
        {
            get;
        }
        
        public abstract string Connection
        {
            get;
        }

        public abstract string Date
        {
            get;
        }

        public abstract string ContentLength
        {
            get;
        }

        public abstract string ContentType
        {
            get;
        }

        public abstract string Server
        {
            get;
        }
    }
}
